<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>RandomIntegerArrayGenerator xref</title>
<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
</head>
<body>
<pre>

<a name="1" href="#1">1</a>   <strong class="jxr_keyword">package</strong> org.slf4j.profiler;
<a name="2" href="#2">2</a>   
<a name="3" href="#3">3</a>   <strong class="jxr_keyword">import</strong> java.util.Random;
<a name="4" href="#4">4</a>   
<a name="5" href="#5">5</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../org/slf4j/profiler/RandomIntegerArrayGenerator.html">RandomIntegerArrayGenerator</a> {
<a name="6" href="#6">6</a>     Random rand = <strong class="jxr_keyword">new</strong> Random(11);
<a name="7" href="#7">7</a>     
<a name="8" href="#8">8</a>     <strong class="jxr_keyword">int</strong>[] generate(<strong class="jxr_keyword">int</strong> size) {
<a name="9" href="#9">9</a>       <strong class="jxr_keyword">int</strong>[] result = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[size];
<a name="10" href="#10">10</a>      <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">int</strong> i = 0; i &lt; size; i++) {
<a name="11" href="#11">11</a>        <strong class="jxr_keyword">int</strong> r = rand.nextInt();
<a name="12" href="#12">12</a>        result[i] = r;
<a name="13" href="#13">13</a>      }
<a name="14" href="#14">14</a>      <strong class="jxr_keyword">return</strong> result;
<a name="15" href="#15">15</a>    }
<a name="16" href="#16">16</a>  }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>

